<%@ page import="java.util.List" %>
<%@ page import="com.bjpowernode.user.Dynamic" %>
<%@ page import="com.bjpowernode.user.User" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" +
            request.getServerPort() + request.getContextPath() + "/";
%>
<html>
<head>
    <title>Title</title>
    <base href="<%=basePath%>">
    <%
        String name = (String) session.getAttribute("username");
        List<Dynamic> dynamicList = (List<Dynamic>) request.getAttribute("dynamicList");
        List<User> userList = (List<User>) request.getAttribute("userList");
        String sou = (String) request.getAttribute("dynamic");
        session.setAttribute("dynamicList",dynamicList);
        session.setAttribute("userList",userList);
        session.setAttribute("sou",sou);
    %>
    <style type="text/css">
        *{
            margin: 0;
            padding: 0;
        }
        #top{
            width: 850px;
            height: 50px;
            background: white;
            margin-top: 20px;
        }
        #left,#right{
            float: left;
            width: 425px;
            height: 50px;
        }
        #leftTop,#rightTop{
            width: 425px;
            height: 40px;
            margin-top: 0;
            line-height: 40px;
        }
        #leftBottom,#rightBottom{
            width: 425px;
            height: 10px;
            margin-top: 0;
        }
    </style>
    <script type="text/javascript" src="jQuery/jquery-3.5.1.js"></script>
    <script type="text/javascript">
        function findDynamic(){
            document.getElementById("leftBottom").style.background = "rgb(248,93,0)";
            document.getElementById("rightBottom").style.background = "";
            $("#frame").attr("src","left.jsp");
        }
        function findUser(){
            document.getElementById("leftBottom").style.background = "";
            document.getElementById("rightBottom").style.background = "rgb(248,93,0)";
            $("#frame").attr("src","right.jsp");
        }
        function overDynamic(){
            document.getElementById("leftTop").style.color = "rgb(248,93,0)";
        }
        function outDynamic(){
            document.getElementById("leftTop").style.color = "";
        }
        function overUser(){
            document.getElementById("rightTop").style.color = "rgb(248,93,0)";
        }
        function outUser(){
            document.getElementById("rightTop").style.color = "";
        }
    </script>
</head>
<body>

<center>
    <div id="top">
        <div id="left">
            <div id="leftTop" align="center">
                <font style="cursor: pointer" onclick="findDynamic()" onmouseout="outDynamic()" onmouseover="overDynamic()">微博</font>
            </div>
            <div id="leftBottom" style="background: rgb(248,93,0)">

            </div>
        </div>
        <div id="right">
            <div id="rightTop" align="center">
                <font style="cursor: pointer" onclick="findUser()" onmouseout="outUser()" onmouseover="overUser()">找人</font>
            </div>
            <div id="rightBottom">

            </div>
        </div>
    </div>
</center>
<iframe id="frame" src="left.jsp" width="100%" height="1000px" style="border: none"></iframe>
</body>
</html>
